<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring3-3.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">

<head th:substituteby="header :: copy"></head>

<body>
	<h1>Database Error</h1>
	<p>An internal data storage error has occurred accessing:</p>
	<p>
		<code th:text="${#httpServletRequest.requestURL}">Request URL</code>
	</p>

	<h3>Notes</h3>
	<p>Notice that there is very little information here. Firstly,
		end-users should not see internal exception details, but secondly, no
		exception details are available anyway.</p>
	<p>
		Compare this to the code in
		<code>ExceptionHandlingController.handleError()</code>
		or
		<code>GlobalControllerExceptionHandler.handleError()</code>
		which explicitly creates a Model and can put extra details into it.
	</p>
	<p>
		Alternatively you could extend <a
			href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.html">
			ExceptionHandlerExceptionResolver</a> and override
	</p>
	<pre>doResolveHandlerMethodException(HttpServletRequest req, HttpServletResponse resp,
    HandlerMethod handlerMethod, Exception exception)</pre>
	<p>
		to add exception and other attributes to the model. Also set the
		inherited
		<code>order</code>
		data-member to a value less than <var>MAX_INT</var> so it runs before the default
		<code>ExceptionHandlerExceptionResolver</code>
		instance (it is easier to create your own handler than try to modify
		the one created by Spring).
	</p>
	
	<div th:substituteby="footer :: copy"></div>
	
</body>
</html>
